<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <style type="text/css">
        div{
            border: 1px solid black;
        }
        /*外层div高度宽度各500像素*/
        #outerDiv{
            width: 500px;
            height: 500px;
        }
        /*内部div高度，宽度各280像素，背景色为红色*/
        #innerDiv{
            width: 280px;
            height: 280px;
            /*背景色为红色*/
            background-color: red;
            /*  3、 设置内部div的外边距100px，*/
            margin: 100px;
            /*内边距为10px*/
            padding: 10px;
        }
    </style>
    <div id="outerDiv">
        <div id="innerDiv">哈哈哈哈</div>
    </div>
    <div>哈哈哈</div>
</body>
</html>